.TH "QwtLegendData" 3 "Mon Jun 1 2020" "Version 6.1.5" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtLegendData \- Attributes of an entry on a legend\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_legend_data\&.h>\fP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBMode\fP { \fBReadOnly\fP, \fBClickable\fP, \fBCheckable\fP }"
.br
.RI "Mode defining how a legend entry interacts\&. "
.ti -1c
.RI "enum \fBRole\fP { \fBModeRole\fP, \fBTitleRole\fP, \fBIconRole\fP, \fBUserRole\fP = 32 }"
.br
.RI "Identifier how to interprete a QVariant\&. "
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtLegendData\fP ()"
.br
.RI "Constructor\&. "
.ti -1c
.RI "\fB~QwtLegendData\fP ()"
.br
.RI "Destructor\&. "
.ti -1c
.RI "void \fBsetValues\fP (const QMap< int, QVariant > &)"
.br
.ti -1c
.RI "const QMap< int, QVariant > & \fBvalues\fP () const"
.br
.ti -1c
.RI "void \fBsetValue\fP (int role, const QVariant &)"
.br
.ti -1c
.RI "QVariant \fBvalue\fP (int role) const"
.br
.ti -1c
.RI "bool \fBhasRole\fP (int role) const"
.br
.ti -1c
.RI "bool \fBisValid\fP () const"
.br
.ti -1c
.RI "\fBQwtGraphic\fP \fBicon\fP () const"
.br
.ti -1c
.RI "\fBQwtText\fP \fBtitle\fP () const"
.br
.ti -1c
.RI "\fBMode\fP \fBmode\fP () const"
.br
.in -1c
.SH "Detailed Description"
.PP 
Attributes of an entry on a legend\&. 

\fBQwtLegendData\fP is an abstract container ( like QAbstractModel ) to exchange attributes, that are only known between to the plot item and the legend\&.
.PP
By overloading \fBQwtPlotItem::legendData()\fP any other set of attributes could be used, that can be handled by a modified ( or completely different ) implementation of a legend\&.
.PP
\fBSee also\fP
.RS 4
\fBQwtLegend\fP, \fBQwtPlotLegendItem\fP 
.RE
.PP
\fBNote\fP
.RS 4
The stockchart example implements a legend as a tree with checkable items 
.RE
.PP

.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBQwtLegendData::Mode\fP"

.PP
Mode defining how a legend entry interacts\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIReadOnly \fP\fP
The legend item is not interactive, like a label\&. 
.TP
\fB\fIClickable \fP\fP
The legend item is clickable, like a push button\&. 
.TP
\fB\fICheckable \fP\fP
The legend item is checkable, like a checkable button\&. 
.SH "Member Function Documentation"
.PP 
.SS "bool QwtLegendData::hasRole (int role) const"

.PP
\fBParameters\fP
.RS 4
\fIrole\fP Attribute role 
.RE
.PP
\fBReturns\fP
.RS 4
True, when the internal map has an entry for role 
.RE
.PP

.SS "\fBQwtGraphic\fP QwtLegendData::icon () const"

.PP
\fBReturns\fP
.RS 4
Value of the IconRole attribute 
.RE
.PP

.SS "bool QwtLegendData::isValid () const"

.PP
\fBReturns\fP
.RS 4
True, when the internal map is empty 
.RE
.PP

.SS "\fBQwtLegendData::Mode\fP QwtLegendData::mode () const"

.PP
\fBReturns\fP
.RS 4
Value of the ModeRole attribute 
.RE
.PP

.SS "void QwtLegendData::setValue (int role, const QVariant & data)"
Set an attribute value
.PP
\fBParameters\fP
.RS 4
\fIrole\fP Attribute role 
.br
\fIdata\fP Attribute value
.RE
.PP
\fBSee also\fP
.RS 4
\fBvalue()\fP 
.RE
.PP

.SS "void QwtLegendData::setValues (const QMap< int, QVariant > & map)"
Set the legend attributes
.PP
\fBQwtLegendData\fP actually is a QMap<int, QVariant> with some convenience interfaces
.PP
\fBParameters\fP
.RS 4
\fImap\fP Values 
.RE
.PP
\fBSee also\fP
.RS 4
\fBvalues()\fP 
.RE
.PP

.SS "\fBQwtText\fP QwtLegendData::title () const"

.PP
\fBReturns\fP
.RS 4
Value of the TitleRole attribute 
.RE
.PP

.SS "QVariant QwtLegendData::value (int role) const"

.PP
\fBParameters\fP
.RS 4
\fIrole\fP Attribute role 
.RE
.PP
\fBReturns\fP
.RS 4
Attribute value for a specific role 
.RE
.PP

.SS "const QMap< int, QVariant > & QwtLegendData::values () const"

.PP
\fBReturns\fP
.RS 4
Legend attributes 
.RE
.PP
\fBSee also\fP
.RS 4
\fBsetValues()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.
